package com.gdut.simple.data.entity;

import android.os.Parcel;
import android.os.Parcelable;

import cn.bmob.v3.BmobUser;
import cn.bmob.v3.datatype.BmobFile;
import cn.bmob.v3.datatype.BmobRelation;

public class User extends BmobUser implements Parcelable {

    private String nickName;
    private BmobFile profile;
    private String gender;
    private String birthday;
    private String area;
    private String intro;
    private String site;
    private BmobRelation follow;

    public String getNickName() {
        return nickName;
    }

    public void setNickName(String nickName) {
        this.nickName = nickName;
    }

    public BmobFile getProfile() {
        return profile;
    }

    public void setProfile(BmobFile profile) {
        this.profile = profile;
    }

    public String getGender() {
        return gender;
    }

    public void setGender(String gender) {
        this.gender = gender;
    }

    public String getBirthday() {
        return birthday;
    }

    public void setBirthday(String birthday) {
        this.birthday = birthday;
    }

    public String getArea() {
        return area;
    }

    public void setArea(String area) {
        this.area = area;
    }

    public String getIntro() {
        return intro;
    }

    public void setIntro(String intro) {
        this.intro = intro;
    }

    public String getSite() {
        return site;
    }

    public void setSite(String site) {
        this.site = site;
    }

    public BmobRelation getFollow() {
        return follow;
    }

    public void setFollow(BmobRelation follow) {
        this.follow = follow;
    }

    @Override
    public int describeContents() {
        return 0;
    }

    @Override
    public void writeToParcel(Parcel dest, int flags) {
        dest.writeString(this.nickName);
        dest.writeSerializable(this.profile);
        dest.writeString(this.gender);
        dest.writeString(this.birthday);
        dest.writeString(this.area);
        dest.writeString(this.intro);
        dest.writeString(this.site);
        dest.writeSerializable(this.follow);
    }

    public User() {
    }

    protected User(Parcel in) {
        this.nickName = in.readString();
        this.profile = (BmobFile) in.readSerializable();
        this.gender = in.readString();
        this.birthday = in.readString();
        this.area = in.readString();
        this.intro = in.readString();
        this.site = in.readString();
        this.follow = (BmobRelation) in.readSerializable();
    }

    public static final Creator<User> CREATOR = new Creator<User>() {
        @Override
        public User createFromParcel(Parcel source) {
            return new User(source);
        }

        @Override
        public User[] newArray(int size) {
            return new User[size];
        }
    };
}
